#pragma once

#include <wx/frame.h>
#include <wx/timer.h>

class Archive;

class wxTreeEvent;
class wxTextCtrl;
class ClassTree;
class DirectoryWatch;
class MainFrame : public wxFrame{
public:
    MainFrame();

    void serialize(Archive& ar);

	void commandFocus();

    DECLARE_CLASS(MainFrame)
    DECLARE_EVENT_TABLE()
protected:
	void poll();

	void onIdle(wxIdleEvent& event);
    void onClose(wxCloseEvent& event);
	void onTimer(wxTimerEvent& event);

	void onSymbolTextChanged(wxCommandEvent& event);
	void onSymbolTextEnter(wxCommandEvent& event);
	void onSymbolSelected(wxTreeEvent& event);
	void onKeyDown(wxKeyEvent& event);

	void onFileOpen(wxCommandEvent& event);
	void onFileOpenDirectory(wxCommandEvent& event);
	void onFilePreferences(wxCommandEvent& event);
	void onFileExit(wxCommandEvent& event);

	void onHelpAbout(wxCommandEvent& event);


	wxTextCtrl* symbolText_;
	wxTextCtrl* memberText_;
	wxTimer timer_;
	ClassTree* tree_;

	DirectoryWatch* directoryWatch_;
};
